﻿
namespace Pixels.Core.Extentions
{
    using System.Collections.Generic;
    using Pixels.ContentTypeItems;
    using Pixels.ExtentedListItems;
    using Pixels.ContentTypes;

    public static class ContentTypeItemExtentions
    {       
        public static IContentTypeItem FetchBaseContentItem(this IContentTypeItem ContentItem) 
        {
            return ContentTypeItemAdapter.GetInstance().ContentItemFetch(ContentItem.BaseContentTypeItemID.Value);
        }

        public static ICollection<IExtentedListItem> ExtentedListItems(this IContentTypeItem ContentItem)
        {
            return ExtentedListItemAdapter.GetInstance().ExtentedListItemsFetchByContentItemID(ContentItem.ContentTypeItemID);
        }

        public static IContentType FetchContentType(this IContentTypeItem ContentItem)
        {
            return ContentTypeAdapter.GetInstance().ContentTypeFetchByContentTypeItemID(ContentItem.ContentTypeID.Value);
        }
    }
}
